The present invention relates to computer systems and, more specifically, to a method and system for business to business data interchange using XML.
Traditionally, for businesses to exchange information electronically, the businesses have to agree on the format of the information that is to be exchanged. For example, two hospitals that desire to exchange patient information may decide that the exchange format will include the following fields:
First Name
Last Name
Address1
Address2
Phone Number
Social Security Number
Internally, each business may store the information in a different format than the agreed-upon exchange format, based on their specific data organization needs. For example, a hospital H1 may store patient information in the following fields:
First Name
Last Name
Street Address
City
State
Zip Code
Social Security Number
Each company that adopts an internal format that is different than the exchange format typically has to develop a tool for converting the data from their format to the exchange format, and from the exchange format to their format. In the example given above, hospital H1 would have to develop a tool that merged data from the City, State, and Zip Code fields to create a value for the Address2 field, and a tool that parsed the value of the Address2 field to generate separate values for the City, State, and Zip Code fields.
The development of such tools may involve a significant amount of overhead. However, when the conversion is only between two formats, the cost of developing the tools may be outweighed by the benefit that each business derives from being able to store the data in a format dictated by its own needs.
Unfortunately, it is difficult to impose a standard exchange format on an entire industry, much less to get all industries to adopt a single standard exchange format. For example, even if all hospitals in the world agree on the exchange format to be used for patient information, the medical supply industry may adopt a different exchange format. Consequently, for a hospital to communicate electronically both with hospitals and with medical supply sources, the hospital would have to develop a tool for converting data between their format and the hospital exchange format, and another tool for converting between their format and the medical supply industry exchange format.
As a practical matter, it is often impossible for a business to accurately anticipate all of the exchange formats that will be required by the businesses with which the given business will want to exchange information. For example, a hospital may need to talk to medicine suppliers, instrument suppliers, banks and so on. Writing a new tool is normally an expensive process, so having to write one for every type of business would soon prove too costly. Thus, even if all of the exchange formats are known, the cost of developing conversion tools to support all of them may be enormous.
Based on the foregoing, it is clearly desirable to provide a mechanism that allows businesses to exchange information without having to know, and provide separate conversion tools for, the formats of the businesses with which they exchange electronic information.
Techniques and tools are provided for allowing businesses to exchange data efficiently without designing special tools for each exchange format. According to one aspect of the invention, techniques are provided for importing data from an XML file into a target repository, including:
receiving a first set of user input that selects a selected set of data structures within the target repository;
receiving a second set of user input that selects a selected set of fields that belong to the selected set of data structures;
receiving a third set of user input that maps one or more fields in the selected set of fields to tags associated with data within the XML file;
generating a set of commands based on the first, second and third sets of user input, wherein the set of commands includes commands for populating the one or more fields that are mapped to tags with the data in the XML file that is associated with the tags; and
issuing the set of commands to cause the one or more fields that are mapped to tags to be populated with the data in the XML file that is associated with the tags.